<!DOCTYPE html>
<html lang="en" ng-app="app" ng-cloak>
<head>
    <meta charset="UTF-8">
    <title></title>
    <link href="../../app/bower_components/bootstrap/dist/css/bootstrap.css" rel="stylesheet">
    <link href="../../app/bower_components/animate-css/animate.css" rel="stylesheet">

    <script src="../../app/bower_components/jquery/dist/jquery.js"></script>
    <script src="../../app/bower_components/angular/angular.js"></script>
    <script src="../../app/bower_components/angular-animate/angular-animate.js"></script>
    <style>
        .swing {
            animation: swing 2s;
        }

        .swing.ng-hide {
            animation: fadeOut 2s;
        }
    </style>
</head>
<body ng-controller="AppController">
<button class="btn btn-success" ng-click="click();">btn</button>
<div ng-show="show" class="swing">
    xxx
</div>


<script>
    var app = angular.module('app', ['ngAnimate']);
    app.controller('AppController', function ($scope) {
        $scope.click = function () {
            $scope.show = !$scope.show;
        };
    });
    /*app.animation('.swing', function () {
     return {
     enter: function ($ele, done) {
     /!*setTimeout(function () {
     done();
     }, 5000);*!/
     }
     }
     });*/

</script>

<script>

/*

    if (false) {

    } else {

        var id = setTimeout(function () {
            location.href = '/xxx.aspx';
        }, 5000);
        $('body').on('click.tmp', (function () {
            clearTimeout(id); // 取消定时任务
            $('body').off('click.tmp'); //取消body的事件
        }));
    }
*/


</script>

</body>
</html>